home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / RGASM.RAR / ASMCODE.EXE / CHAPT1-5 / HELLO2.ASM < prev    next >
Encoding:
Assembly Source File  |  1993-05-10  |  865 b   |  20 lines

  1. ;
  2. ;       Program Hello2 ( Chapter 3 )
  3. ;
  4. TITLE    Hello2 Example Program 2 ; title is not necessary
  5. .MODEL   SMALL                    ; declare memory model
  6. .CODE                             ; declare code segment
  7. Start:   MOV     AX,@Data         ; copy address of data
  8.          MOV     DS,AX            ; segment into DS
  9.          LEA     DX,Hello
  10.          MOV     AH,09h           ; define DOS function number
  11.          INT     21h              ; call DOS function to display
  12.          MOV     AH,4Ch           ; define DOS function to exit
  13.          MOV     AL,00h           ; with code zero
  14.          INT     21h              ; exit to DOS
  15.  
  16. .DATA                             ; declare data segment
  17.  Hello   DB      'Hello!$'        ; define string to be displayed
  18. .STACK                            ; declare stack segment
  19.          END     Start
  20.